<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			// 定义一个函数
			function test(){
				document.getElementById('_text').innerHTML = new Date();
			}
			setInterval('test()', 1000);
		</script>
	</head>
	<body onload="test()">
		<h1>定时运行</h1>
		<ul>
			<li id="_text"></li>
		</ul>
	</body>
</html>
